// const Layout = () => import(/* webpackChunkName: 'index' */ '../page/layout')
import Layout from '../views/layout/Layout'
import { router_full } from "@/api/login"


const curr_routers = router_full


export const constantRouterMap = [
    { path: '/login', component: () => import('@/views/login/index'), hidden: true },
    { path: '/404', component: () => import('@/views/404'), hidden: true },

    {
        path: '/',
        component: Layout,
        redirect: '/home',
        name: 'home',
        hidden: true,
        meta: {allowBack: false},
        children: [{
            path: 'home',
            component: () => import('@/views/dashboard/index')
        }]
    }
    /*
    {
        name: '系统管理模块1111',
        icon: 'el-icon-setting',
        path: '/components', //這裏不用跳轉
        child: [
            {
                path: '/user',
                meta: { title: '用户管理11111', icon: 'table' },
                component: () => import('@/views/function/user'),
                code: 'A0002'
            }
        ]
    },
    */
   //  { path: '*', redirect: '/404', hidden: true }
]
console.log('constantRouterMap=',constantRouterMap)
for(let i in constantRouterMap) {
    curr_routers.push(constantRouterMap[i])
}

console.log('curr_routers', curr_routers)

export const asyscRouteMap = curr_routers // 使用全量路由并加上上面的静态路由


